/*
 * @Author: zhangfeng
 * @Date: 2023-12-25 14:54:39
 * @LastEditTime: 2023-12-26 16:11:24
 * @LastEditors: zhangfeng
 * @Description:
 * @FilePath: \nodeapi\src\model\role.model.js
 * © 2023 张峰，All rights reserved.
 */
const { DataTypes } = require("sequelize");

const seq = require("../db/seq");

// 创建角色模型

const Role = seq.define("zd_roles", {
  name: {
    type: DataTypes.STRING,
    allowNull: false,
    unique: true, //唯一性
    comment: "角色名称",
  },
  description: {
    type: DataTypes.STRING,
    allowNull: true,
    comment: "描述",
  },
});

// Role.sync({ force: false });

module.exports = Role;
